import { createRouter, createWebHistory } from 'vue-router'

import homeView from '@/views/home/home.vue'
import indexView from '@/views/home/children/index.vue'
import claView from '@/views/home/children/cla.vue'
import cartView from '@/views/home/children/cart.vue'
import myView from '@/views/home/children/my.vue'




const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/', redirect: '/home/index' },
    {
      path: '/home', name: 'home', component: homeView, children:
        [
          { path: 'index', name: 'index', component: indexView },
          { path: 'cla', name: 'cla', component: claView },
          { path: 'cart', name: 'cart', component: cartView },
          { path: 'my', name: 'my', component: myView },
        ]
    },
  ],
})
export default router
